<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateGoldPayRecordsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('gold_pay_records', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('user_id')->default(0)->index()->comment('支付人ID');
            $table->unsignedBigInteger('from_user_id')->default(0)->index()->comment('被支付人ID');;
            $table->unsignedBigInteger('gold_record_id')->default(0)->index()->comment('支付记录ID');;
            $table->string('voucher')->nullable()->comment('支付凭证');
            $table->boolean('is_examine')->default(false)->comment('是否审核');
            $table->boolean('is_contact')->default(false)->comment('是否联系客服');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('gold_pay_records');
    }
}
